<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Neon Music Player - 20230001张三</title>
    <style>
        /* 霓虹风格CSS */
        :root {
            --neon-green: #0ff;
            --neon-purple: #b10ff7;
            --dark-bg: #1a1a1a;
        }
        body {
            font-family: 'Poppins', sans-serif;
            background: var(--dark-bg);
            margin: 0;
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
        }
        .container {
            width: 90%;
            max-width: 600px;
            background: rgba(0, 0, 0, 0.7);
            border-radius: 20px;
            padding: 30px;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255,255,255,0.1);
            box-shadow: 0 0 30px rgba(var(--neon-purple), 0.2);
            position: relative;
            overflow: hidden;
        }
        .container::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: linear-gradient(
                45deg,
                transparent,
                var(--neon-purple),
                var(--neon-green)
            );
            animation: rotate 20s linear infinite;
            z-index: -1;
        }
        @keyframes rotate {
            100% { transform: rotate(360deg); }
        }
        .player-controls {
            display: flex;
            align-items: center;
            gap: 20px;
            margin-top: 30px;
        }
        button {
            padding: 15px 30px;
            border: none;
            border-radius: 15px;
            background: linear-gradient(135deg, var(--neon-purple), var(--neon-green));
            color: white;
            cursor: pointer;
            transition: 0.3s;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 1px;
            position: relative;
            overflow: hidden;
        }
        button::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(
                90deg,
                transparent,
                rgba(255,255,255,0.2),
                transparent
            );
            transition: 0.5s;
        }
        button:hover::before {
            left: 100%;
        }
        .progress-bar {
            flex-grow: 1;
            height: 8px;
            background: rgba(255,255,255,0.1);
            border-radius: 10px;
            cursor: pointer;
            position: relative;
        }
        .progress {
            height: 100%;
            background: linear-gradient(90deg, var(--neon-purple), var(--neon-green));
            border-radius: 10px;
            width: 0;
            transition: 0.3s;
            position: relative;
        }
        .progress::after {
            content: '';
            position: absolute;
            right: -5px;
            top: -3px;
            width: 14px;
            height: 14px;
            background: var(--neon-green);
            border-radius: 50%;
            box-shadow: 0 0 10px var(--neon-green);
        }
        .playlist {
            margin-top: 40px;
            border-top: 2px solid rgba(255,255,255,0.1);
            padding-top: 25px;
        }
        .playlist-item {
            padding: 15px;
            margin: 10px 0;
            background: rgba(255,255,255,0.05);
            border-radius: 12px;
            cursor: pointer;
            transition: 0.3s;
            position: relative;
        }
        .playlist-item:hover {
            background: rgba(var(--neon-purple), 0.2);
            transform: translateX(10px);
        }
        .playlist-item::before {
            content: '▶';
            position: absolute;
            left: -25px;
            opacity: 0;
            color: var(--neon-green);
            transition: 0.3s;
        }
        .playlist-item:hover::before {
            opacity: 1;
            left: -15px;
        }
        #song-title {
            font-size: 2em;
            text-align: center;
            margin: 20px 0;
            text-shadow: 0 0 10px rgba(var(--neon-green), 0.5);
        }
        .current-time {
            font-size: 14px;
            color: var(--neon-green);
            min-width: 60px;
            text-align: right;
        }
        /* 学号样式 */
        .student-info {
            position: absolute;
            top: 15px;
            right: 20px;
            color: var(--neon-green);
            font-size: 14px;
            text-shadow: 0 0 8px rgba(var(--neon-green), 0.3);
        }
    </style>
    <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap" rel="stylesheet">
</head>
<body>
    <div class="container">
        <div class="student-info">
            23215220322 | 唐铭阳
        </div>
        
        <div id="player">
            <h2 id="song-title">♪ 音乐播放器 ♪</h2>
            <div class="player-controls">
                <button onclick="playPrev()">◄◄</button>
                <button id="playBtn" onclick="togglePlay()">▶</button>
                <button onclick="playNext()">►►</button>
                <div class="progress-bar" onclick="seek(event)">
                    <div class="progress" id="progress"></div>
                </div>
                <span class="current-time" id="currentTime">00:00</span>
            </div>
        </div>

        <div class="playlist">
            <h3>🎵 播放列表</h3>
            <div id="playlist-items"></div>
        </div>

        <audio id="audio" ontimeupdate="updateProgress()"></audio>
    </div>

    <script>
        // 音乐数据（替换为实际音频文件）
        const songs = [
            { title: "SOBER-GD", url: "music1.mp3" },
            { title: "一天一天-GD", url: "music2.mp3" }
        ];

        let currentSongIndex = 0;
        const audio = document.getElementById('audio');
        const playBtn = document.getElementById('playBtn');

        function initPlaylist() {
            const playlist = document.getElementById('playlist-items');
            songs.forEach((song, index) => {
                const div = document.createElement('div');
                div.className = 'playlist-item';
                div.innerHTML = `
                    <span style="color: var(--neon-green)">${index + 1}.</span>
                    ${song.title}
                `;
                div.onclick = () => loadSong(index);
                playlist.appendChild(div);
            });
        }

        function loadSong(index) {
            currentSongIndex = index;
            audio.src = songs[index].url;
            document.getElementById('song-title').textContent = songs[index].title;
            audio.play();
            playBtn.textContent = '⏸';
        }

        function togglePlay() {
            if (audio.paused) {
                audio.play();
                playBtn.textContent = '⏸';
            } else {
                audio.pause();
                playBtn.textContent = '▶';
            }
        }

        function playPrev() {
            currentSongIndex = (currentSongIndex - 1 + songs.length) % songs.length;
            loadSong(currentSongIndex);
        }

        function playNext() {
            currentSongIndex = (currentSongIndex + 1) % songs.length;
            loadSong(currentSongIndex);
        }

        function updateProgress() {
            const progress = (audio.currentTime / audio.duration) * 100;
            document.getElementById('progress').style.width = `${progress}%`;
            document.getElementById('currentTime').textContent = 
                formatTime(audio.currentTime);
        }

        function seek(e) {
            const rect = e.target.getBoundingClientRect();
            const pos = (e.clientX - rect.left) / rect.width;
            audio.currentTime = pos * audio.duration;
        }

        function formatTime(seconds) {
            const min = Math.floor(seconds / 60);
            const sec = Math.floor(seconds % 60);
            return `${min.toString().padStart(2, '0')}:${sec.toString().padStart(2, '0')}`;
        }

        initPlaylist();
        loadSong(0);
    </script>
</body>
</html>